<template>
  <table cellpadding="10" cellspacing="0" border="1">
    <tr>
      <th>id</th>
      <th>name</th>
      <th>sex</th>
      <th>score</th>
      <th>address</th>
    </tr>
    <tr v-for="item in studentList":key="item.id">
      <td>{{item.id}}</td>
      <td>{{item.name}}</td>
      <td>{{item.sex}}</td>
      <td>{{item.score}}</td>
      <td>{{item.address}}</td>

    </tr>
  </table>
</template>

<script lang="ts" setup>

interface Student {
  id:number
  name: string,
  sex:string,
  score:number,
  address:string
}
let studentList:Array<Student>=[
  {id:1, name: "张三", sex: "男", score: 90, address: "北京市海淀区"},
  {id:2, name: "李四", sex: "女", score: 85, address: "上海市浦东新区"},
  {id:3, name: "张三", sex: "男", score: 90, address: "北京市海淀区"},
  {id:4, name: "李四", sex: "女", score: 85, address: "上海市浦东新区"},
  {id:5, name: "张三", sex: "男", score: 90, address: "北京市海淀区"},
  {id:6, name: "李四", sex: "女", score: 85, address: "上海市浦东新区"},
  {id:7, name: "张三", sex: "男", score: 90, address: "北京市海淀区"},
  {id:8, name: "李四", sex: "女", score: 85, address: "上海市浦东新区"}
]
</script>

<style>

</style>